https://leetcode.cn/problems/two-sum/
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        unordered_map<int,int> hash;
        vector<int> ret(2);

        for(int i=1;i<nums.size();i++)
        {
            hash[nums[i-1]]=i-1;
            if(hash.count(target-nums[i]))
                return {i,hash[target-nums[i]]};
            
        }
        return ret;
    }
};